import * as THREE from 'three'
import Experience from '../class/Experience';
import { CSS3DRenderer, CSS3DObject } from 'three/examples/jsm/renderers/CSS3DRenderer.js';
import stationData from '../data/station'
export default class Station {
    constructor() {
        this.group = new THREE.Group()
        this.group.position.y = 2;
        this.createStationFromHtml();
    }
    createStationFromHtml() {
        stationData.forEach((item, index) => {
            // console.log(item, index);
            const rowTag = document.getElementById(`station${index}`);
            const label = new CSS3DObject(rowTag);
            label.position.set(item.x, this.group.position.y, item.z);
            label.rotateX(-Math.PI / 2);
            // label.scale.set(0.5, 0.5, 0.5)
            this.group.add(label)
        });
    }
}